﻿using System;
/*using System.Collections.Generic;
using System.Linq;
using System.Text;*/

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Please input the array:");
        string input = Console.ReadLine();
        string[] numbers = input.Split(new char[] { ',', ' ', ';' }, StringSplitOptions.RemoveEmptyEntries);
        int[] intArray = new int[numbers.Length];
        int n = 0;
        for (int i = 0; i < numbers.Length; i++)
        {
            if (int.TryParse(numbers[i],out n))
            {
                intArray[i] = n;
            }
            else
            {
                Console.WriteLine("Input error");
                return;
            }
        }

        Array.Sort(intArray);

        Console.WriteLine("result: ");
        foreach (int number in intArray)
        {
            Console.Write(number + " ");
        }
        Console.WriteLine("\n按任意键退出...");
        Console.ReadLine();
    }
}